<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <META HTTP-EQUIV="pragma" CONTENT="no-cache">
  <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
  <META HTTP-EQUIV="expires" CONTENT="0">
  <title>Document</title>
  <link rel="stylesheet" href="css/element-ui.css" />
  <link rel="stylesheet" href="css/antd.css" />
  <link rel="stylesheet" href="./components/sideLayout/index.css" />
  <link rel="stylesheet" href="./components/Department.css" />
  <link rel="stylesheet" href="./components/index.css" />
</head>
<style>
  [v-cloak] {
    display: none;
  }
</style>

<body>
  <div id="app" v-cloak>
    <admin :Data='Das'>
    <router-view></router-view>
    </admin>


  </div>
  <script src="js/common.js"></script>
  <script src="./lib/axios.min.js"></script>
  <script src="./components/sideLayout/index.js"></script>
  <script src="./components/test.js"></script>
  <script src="./request/config.js"></script>
  <script src="./request/apiList.js"></script>
  <script src="./request/paramter.js"></script>
  <script src="./util/index.js"></script>

  <script src="./router/home.js"></script>
  <script src="./router/manager.js"></script>
 <!-- 權限管理 -->
 <script src="./router/authority.js"></script>


  <script type="module">

  let loadinginstance, loadCount = 0,
  loadingArray = [];
  const Axios = axios.create({
    baseURL:baseUrl,
    timeout: 1000,
    headers: {},
    validateStatus: (status)=> {
    return status >= 200 && status < 300; // default
    },
  })

  // 添加请求拦截器
  Axios.interceptors.request.use( (config)=> {
    // 在发送请求之前做些什么
   
    // loadCount++
    //   loadinginstance = 
    //   loadingArray.push(loadinginstance)
    return config;
  }, (error)=> {

    return Promise.reject(error);
  });

// 添加响应拦截器
Axios.interceptors.response.use((res) =>{
  
      let { data } = res
    return data;
  },  (error)=> {
    // 对响应错误做点什么
    return Promise.reject(error);
  });
   

  
    Vue.use(httpVueLoader);
    // Vue.prototype.$baseUrl = baseUrl;
    Vue.prototype.$Axios = Axios;
    Vue.prototype.$apiList = apiList;
    Vue.prototype.$paramters = paramters;
    const router = new VueRouter({
      routes: [
        home,
        manager,
        authority
      ]
    })
   new Vue({
      name: 'Index',
      router,
      components: {
        "admin": httpVueLoader('./components/admin/index.vue')
        // 'navigation':,
        // 'picker':httpVueLoader('./components/picker/index.vue'),
        // 'cascader':httpVueLoader('./components/cascader/index.vue'),
        // 'navigatios':httpVueLoader('./components/navigatios/index.vue'),
        // 'tabs':httpVueLoader('./components/tabs/index.vue'),
        // 'sidebar':httpVueLoader('./components/sidebar/index.vue')

      },
      data() {
        return {
          Das: [],
        }
      },
      mounted() {
        this.$Axios.get(this.$apiList.platform, this.$paramters.menu('Home', 0)).then(res => {
          this.Das = res.returnvalue
       
        })
       
      },
      methods: {
        dalist(datas) {

        },
        tab(e) {

          this.tabPosition = e.target.value

        }

      },
    }).$mount('#app')

  </script>

</body>

</html>